package org.example.creational.singleton.hungry;

public class Test {

    public static void main(String[] args) {
        EnumSingleton enumSingleton = EnumSingleton.getInstance();
        EnumSingleton enumSingleton1 = EnumSingleton.getInstance();
        System.out.println(enumSingleton);
        System.out.println(enumSingleton1);

        enumSingleton.setData(new Object());

        System.out.println(enumSingleton.getData());
        System.out.println(enumSingleton1.getData());

        enumSingleton1.setData(new Object());

        System.out.println(enumSingleton);
        System.out.println(enumSingleton1);


        System.out.println(enumSingleton.getData());
        System.out.println(enumSingleton1.getData());

    }




}
